<template>
  <div>
    我是根组件 == {{ str }}==
    <fater></fater>
  </div>
</template>
<script>
import fater from './hodai/father.vue'
export default {
  components: { fater },
  //固定语法provide,类型为函数,可以传递函数或者对象,数组
  provide () {
    return {
      content1: this.content,
      say: this.say,
      str1: this.str,
      change: this.change
    }
  },
  data () {
    return {
      content: '啦啦啦provide',
      str: '我是需要修改的数据'
    }
  },
  created () {

  },
  computed: {
  },
  methods: {
    say (msg) {
      console.log('hello' + msg);
    },
    change (text) {
      this.str = text
    }

  }
}
</script>
<style lang='less'  scoped>
</style>
